
cc.Class({
    extends: cc.Component,

    properties: {
        pokerNode:{
            default:null,
            type:cc.Node
        },

        labelContent:{
            default:null,
            type:cc.Label
        }
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
    },

    start () {
        this._startBorderBlink(cc.find("border",this.pokerNode))
        // cc.gg.gameDataUtil.setFakeNodePosition([this.pokerNode])
        // this.labelContent.string = cc.gg.i18n.getSentence(cc.gg.i18n.sentence.G_SET)
    },

    // update (dt) {},

    onGuild4PokerClicked:function (event) {
        cc.find("Canvas").emit("guild_grab_diamond10")
    },

    _startBorderBlink:function (borderNode) {
        var fadeIn = cc.fadeIn(0.4)
        var fadeOut = cc.fadeOut(0.4)
        let seq = cc.sequence(fadeIn,fadeOut)
        let repeat = cc.repeatForever(seq)

        borderNode.active = true
        borderNode.runAction(repeat)
    }
});
